# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname=recode
pkgver=3.7.6
pkgrel=0
pkgdesc="Charset converter tool and library"
url="https://github.com/pinard/Recode"
arch="all"
license="GPL-2.0-or-later"
makedepends="libtool automake autoconf texinfo flex bison gettext-dev
	python3"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/rrthomas/recode/releases/download/v$pkgver/recode-$pkgver.tar.gz
	"

prepare() {
	default_prepare
	rm -f acinclude.m4 m4/libtool.m4
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-nls \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="ababefc445fcc47b6bf9ed640b767aed374bb8ce93cdccb641dd1ba5d298360583dd79070a0bb458f1190a8d6f1ddeb3b04eec34a61305b69def0963cec5843f  recode-3.7.6.tar.gz"
